package com.ck.springboot.kafka.advance.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

/**
 * @Classname KafkaConsumerService
 * @Description 消费者服务类
 * @Date 2021/7/12 16:56
 * @Created by lpc
 */
@Service
@Slf4j
public class KafkaConsumerService {

    @KafkaListener(topics = {"test"},groupId = "group1", containerFactory="kafkaListenerContainerFactory")
    public void kafkaListener(String message){
        log.info(message);
    }
}
